<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let str = 'qwer你真好'

    console.log( str.startsWith('w') )  // false
    console.log( str.startsWith('a') )  // false
    console.log( str.startsWith('q') )  // true

    console.log( str.endsWith('w') )  // false
    console.log( str.endsWith('a') )  // false
    console.log( str.endsWith('q') )  // false
    console.log( str.endsWith('好') )  // true



  </script>
</body>
</html>